#include <iostream>
#include <cmath>
#include <algorithm>

using namespace std;

const int MaxN = 1e5+5;

struct node{
	int id;
	double val;
};

bool cmp(node a,node b){
	return a.val < b.val;
}

int main(){
	
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	
	int t;
	cin >> t;
	while(t--){
		int n,H;
		cin >> n >> H;
		node a[n];
		for(int i = 0; i < n; ++i){
			a[i].id = i+1;
			int h;
			cin >> h;
			a[i].val = sqrt((double)h) * sqrt((double)(H-h));
		}
		sort(a,a+n,cmp);
		for(int i = 0; i < n; ++i){
			cout << a[i].id << ' ';
		}
		if(t) cout << endl;
	}
	
	return 0;
}

